<html>
<head><meta charset="utf-8"><title>Opt-out for config file values · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Opt-out.20for.20config.20file.20values.html">Opt-out for config file values</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212360029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Opt-out%20for%20config%20file%20values/near/212360029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Philipp Oppermann <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Opt-out.20for.20config.20file.20values.html#212360029">(Oct 05 2020 at 21:37)</a>:</h4>
<p>Hi, I wanted to ask for feedback on my proposals in <a href="https://github.com/rust-lang/cargo/issues/8687">#8687</a> and <a href="https://github.com/rust-lang/cargo/issues/8643">#8643</a>. They are both about adding a way to opt-out of values set in <code>.cargo/config</code> configuration files. While overriding values is already possible, it is not possible to bring all values back to their "not set" state. The resulting problem is that right now a single exceptional use case can prevent you from using config files at all for a project, which can be very frustrating.</p>
<p>While I understand that the Cargo team wants to avoid making the config system more complex, I think this particular issue of config files is relatively isolated and a solution would remain useful even if the config system is overhauled as <a href="https://internals.rust-lang.org/t/problems-of-cargo-config-files-and-possible-solutions/12987/3">suggested by <span class="user-mention silent" data-user-id="239881">Josh Triplett</span></a>. In my opinion, the best way forward for this would be to implement <em>some</em> way of opting out of config values as an unstable feature for experimentation. Then, after some time, we can evaluate how the feature is used by people and whether it is still needed, and then write up a proper RFC (or similar) for it.</p>



<a name="212361145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Opt-out%20for%20config%20file%20values/near/212361145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Opt-out.20for.20config.20file.20values.html#212361145">(Oct 05 2020 at 21:50)</a>:</h4>
<p><a href="http://docs.rs">docs.rs</a> has run into trouble with this too when building crates. Our solution was to just remove the config file altogether, but obviously that doesn't work when you sometimes do want to use it.</p>



<a name="212362813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Opt-out%20for%20config%20file%20values/near/212362813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Opt-out.20for.20config.20file.20values.html#212362813">(Oct 05 2020 at 22:10)</a>:</h4>
<p><span class="user-mention" data-user-id="121929">@Philipp Oppermann</span> I'd have <em>no</em> objection to some kind of <code>--no-config</code> option, and equivalent environment variable.</p>



<a name="212362831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Opt-out%20for%20config%20file%20values/near/212362831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Opt-out.20for.20config.20file.20values.html#212362831">(Oct 05 2020 at 22:10)</a>:</h4>
<p>As a complete reset.</p>



<a name="212362856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Opt-out%20for%20config%20file%20values/near/212362856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Opt-out.20for.20config.20file.20values.html#212362856">(Oct 05 2020 at 22:11)</a>:</h4>
<p>That seems useful no matter what improvements we make to the config system in the future.</p>



<a name="212396833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Opt-out%20for%20config%20file%20values/near/212396833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Philipp Oppermann <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Opt-out.20for.20config.20file.20values.html#212396833">(Oct 06 2020 at 08:15)</a>:</h4>
<p>That's great to hear! I try to prepare a PR for this</p>



<a name="212406822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Opt-out%20for%20config%20file%20values/near/212406822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Philipp Oppermann <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Opt-out.20for.20config.20file.20values.html#212406822">(Oct 06 2020 at 10:05)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> I opened a PR at <a href="https://github.com/rust-lang/cargo/pull/8757">https://github.com/rust-lang/cargo/pull/8757</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>